<%= title @milestone.title.titleize %>

<%= simple_format h(@milestone.description) %>

<hr />

<%= render "activities", :activities => @activities_by_user %>

<%= render "comments/list", :commentable => @milestone %>

<%= render "comments/form", :commentable => @milestone %>

<% content_for :sidebar do %>
	<p class="center" style="margin-bottom: 30px">
		<%= link_to content_tag(:span, t(:add_activity, :scope => :milestone), :class => "icon add"), 
					new_project_milestone_activity_url(@project, @milestone), 
					:class => "awesome large" %>
	</p>
	
	<div>
		<small><%= t :label, :scope => [:milestone, :due] %></small>
		<h1><%= l @milestone.due %></h1>
	</div>
	
	<div >
		<small><%= t :label, :scope => [:milestone, :progress] %></small>
		<h1><%= number_to_percentage @milestone.progress, :precision => 0 %></h1>
	</div>
	
	<% if @milestone.activities.open.size %>
		<div>
			<small><%= t :pending_activities, :scope => [:milestone, :status] %></small>
			<h1><%= @milestone.activities.open.size %></h1>
		</div>
	<% end %>
	
	<div>
		<small><%= t :completed_activities, :scope => [:milestone, :status] %></small>
		<h1><%= @milestone.activities.completed.size %></h1>
	</div>
	
	<%= render "responsibles", :milestone => @milestone %>
<% end %>

<% content_for :subtabs do %>
	<%= render "milestones/navigation/show_subtabs" %>
<% end %>